local close = ...

local rpc = require 'rpc'
local interface = require 'interface'
local socket = require 'socket'
local serialize = require'serialize'

--local IP = "localhost"
local IP = require"servip"
local port = 55000

--local start = io.read()

local p = rpc.createproxy( IP, port, interface, close=='close' )

local tab = {}
for i=1,100 do
  table.insert(tab,10.5)
end
local t1 = socket.gettime()
for i=1, 50 do
  local t_str = serialize('t',tab)
  t_str = string.gsub(t_str,"\n","")
  t_str = t_str .. ' return t'
  p.bar(t_str)
end
print((socket.gettime()-t1)/50)

